if exist "C:\Keil\ARM\BIN31\fromelf.exe" (
  set bin="C:\Keil\ARM\BIN31\fromelf.exe"
) else (
  if exist "D:\Keil\ARM\BIN31\fromelf.exe" (
    set bin="D:\Keil\ARM\BIN31\fromelf.exe"
  ) else (
    if exist "E:\Keil\ARM\BIN31\fromelf.exe" (
      set bin="E:\Keil\ARM\BIN31\fromelf.exe"
    )
  )
)

if exist .\Obj\Application-RD.axf (
  %bin% ".\Obj\Application-RD.axf" --bin --output ".\Obj\Application-RD.bin"
  copy ".\Obj\Application-RD.bin" "..\..\bin\Application.bin"
) else (
  if exist .\Obj\Application-RB.axf (
    %bin% ".\Obj\Application-RB.axf" --bin --output ".\Obj\Application-RB.bin"
    copy ".\Obj\Application-RB.bin" "..\..\bin\Application.bin"
  )
)